var scripts = [null,
    "LingUI/js/jqGrid/jquery.jqGrid.js",
    "LingUI/js/jqGrid/i18n/grid.locale-cn.js",
    "LingUI/js/jquery/jquery-form.js",
    "LingUI/js/input.js",
    "LingUI/js/validate-methods.js",
    "LingUI/js/jsutil/jquery.dataSelect.js",				//下拉框控件
    "LingUI/datetimepicker/jquery.datetimepicker.js",		//下拉时间控件
    "LingUI/js/layer/layer.lui.js",
    null];

ace.load_ajax_scripts(scripts, function () {
    jQuery(function ($) {
        $('input, textarea').placeholder();//占位符
        $(".form-actions").width($(".form-horizontal").width() - 40);
    });
});

function saveSystem(){
    var json = {};
    var name = $("#sysName").val();
    var code = $("#sysCode").val();
    if(name == "" || code == ""){
        alert("请将信息填写完整!");
        return;
    }
    var con = confirm("确认要保存系统信息吗?");
    if(!con){
        return;
    }
    json["name"] = name;
    json["code"] = code;
    $.post("../authorization/saveSystem.do",
        {json:JSON.stringify(json)},
        function(data){
            if(data.success == "Y"){
                if(data.exist == "N"){
                    alert("添加成功!");
                }else{
                    alert("系统CODE已存在,请修改CODE!");
                }
                toLocation("#ssystem/ystemAdmin.jsp");
            }else{
                alert("系统异常,请联系客服人员!");
            }
        },"json");


}